<legend><h3>SMS > Tulis Pesan</h3></legend>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $('input[name=cbAll]').change(function() {
            $("input[name^=DestinationNumber]").attr('checked', $(this).attr('checked'));
        });
    });
</script>
<h3><?php echo $notifikasi; ?></h3>
<form action="swrite" method="post">
    <fieldset>
        <label for="cbAll"><input type="checkbox" name="cbAll" id="cbAll" />Select All</label><br>
        <?php
        if (isset($telpon)) {
            foreach ($isi as $nganu) {
                ?>
                <p>
                    <?
                    foreach ($telpon as $tlp) {
                        if ($tlp->username == $nganu->username) {
                            if ($nganu->attribute == "Expiration") {
                                ?>
                                <label>
                                    <input type="checkbox" class="cek" name="DestinationNumber[]" value="<?php echo $tlp->telpon; ?>">
                                    <?php
                                    echo $tlp->username . ' (' . $tlp->telpon . ')';
                                }
                            }
                            ?>
                        </label>
                    <? } ?>     
                </p>
                <?
            }
        } else {
            echo "Data Pelanggan Kosong";
        }
        ?>
        <p><label>Isi Pesan:</label><textarea name="TextDecoded" rows="5" cols="3"></textarea></p>
        <p><label>ID Pengirim:</label><input type="text" class="text-long" name="CreatorID"/></p>
        <div class="control-group">
            <div class="control">
                <input class="btn" type="submit" value="kirim" class="button-submit"/>
            </div>
        </div>
    </fieldset>
</form>